package Stream;

import java.awt.Component;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

public class MapData implements Serializable{

	String userId;
	String irum;
	String phone;
	Date nal;
	
	public MapData(String id, String irum, String phone){
		this.userId = id;
		this.irum = irum;
		this.phone = phone;
		this.nal = new Date();
	}
	
	public String toString(){
		SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
		String temp = sd.format(nal);
		String str = String.format("%-10s %-10s %-15s %-15s\n", userId,irum,phone,temp);
		
		return str;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public void setIrum(String irum) {
		this.irum = irum;
	}

	public String getUserId() {
		return userId;
	}

	public String getIrum() {
		return irum;
	}

	public String getPhone() {
		return phone;
	}

	public Date getNal() {
		return nal;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public void setNal(Date nal) {
		this.nal = nal;
	}

//	public static void main(String[] args) {
//		MapData md = new MapData("아이디","이름","전화번호"	);
//		String aa= md.toString();
//		System.out.println(aa);
//	}
}
